<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <select id="demo1" onclick="handleChange()">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
  </select>

  <select id="demo2">
  </select>
</body>
<script>
  const handleChange = () => {
    const demo1 = document.getElementById('demo1')
    var index = demo1.selectedIndex; // 选中索引
    var demo1Value = demo1.options[index].value; // 选中值
    const demo2 = document.getElementById('demo2')
    demo2.innerHTML = ''
    for (let index = 1; index < 4; index++) {
      const node = document.createElement('option')
      node.setAttribute('class','test')
      console.log('demo1Value',demo1Value + 0.1 * index);
      node.value = Number(demo1Value) + 0.1 * index
      node.text =  Number(demo1Value) + 0.1 * index
      demo2.appendChild(node)
    }
    console.log(demo2);

  }

</script>

</html>